# _*_ coding utf-8 _*_
# george
# time: 2025/1/11上午11:47
# name: settings.py
# comment:
# 设置开发模式
from flask import session,redirect
from functools import wraps

env = "test"

# 设置装饰器，来设置其他页面登陆的session要求
def login_required(func):
    @wraps(func)
    def wrapper(*args, **kwargs):
        if not session.get("user_info"):
            return redirect("/login")
        return func(*args, **kwargs)
    return wrapper